<script setup lang="ts">
import { useRoute } from "vue-router";

let route = useRoute();
</script>

<template>
    <router-view v-slot="{ Component }">
        <!-- 使用任何自定义过渡和回退到 `fade` -->
        <transition :name="route?.meta?.transition || 'fade'">
            <component :is="Component" />
        </transition>
    </router-view>
</template>
